<script setup>
  import { useCountStore } from '@/store/count.js'
  import { storeToRefs } from 'pinia'
  import { useTestStore } from '@/store/test.js'
  import { ref } from 'vue'
  const counts = useCountStore()
  const tests = useTestStore()
  let newCount = 9
  let { count, pow } = storeToRefs(counts)
  const { obj } = counts
  const patch = () => {
    // counts.$patch({
    count = newCount
    // })
  }
</script>
<template>
  {{ count }}
  <view>{{ pow }}</view>
  <view>{{ obj }}</view>
  <button @click="counts.addCount">++</button>
  <button @click="counts.cutCount">--</button>
  <button @click="patch">$patch</button>
  <button @click="counts.objChange">obj</button>
  <button @click="tests.change">test</button>
</template>

<style></style>
